package dp.mobile.entity;

import javax.microedition.khronos.opengles.GL10;

import dp.mobile.game.Player;
import dp.mobile.glwrapper.GLTexture;

public class Node extends Entity{
	private static final long serialVersionUID = -1675752367100791986L;
	protected Node() {
		mName	= "Tower's Node";
		mTileX	= 0;
		mTileY	= 0;
		mIsOnline = false;
	}
	
	public Node(int x, int y, GLTexture offline, GLTexture online) {
		this();
		mTileX = x;
		mTileY = y;
		
		mOfflineTexture = offline;
		mOnlineTexture	= online;
	}
	
	public void setOfflineTexture(GLTexture img) {
		mOfflineTexture = img;
	}
	
	public void setOnlineTexture(GLTexture img) {
		mOnlineTexture = img;
	}
	
	public void setPlayer(Player p) {
		mPlayer = p;
	}
	
	@Override
	public void draw(GL10 gl) {
		
	}
	
	public void setOnline(boolean online) {
		mIsOnline = online;
	}
	
	public boolean isOnline() {
		return mIsOnline;
	}
	
	public GLTexture getImage() {
		if (mIsOnline)
			return mOnlineTexture;
		else
			return mOfflineTexture;
	}
	
	private GLTexture mOfflineTexture, mOnlineTexture;
	private boolean mIsOnline;
}
